home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 52
/
Amiga Format AFCD52 (Issue 136, May 2000).iso
/
-screenplay-
/
hd_installers
/
whdigames
/
whdigamesa-b
/
bat.lha
/
BAT
/
BATInstall
< prev
next >
Wrap
Text File
|
1998-05-08
|
3KB
|
167 lines
;Patcher-install-script for Gore-Design-Installs
;****************************
(set #readme-file (cat @app-name ".Txt")) ; name of readme file
(set #cleanup "") ; files to delete after install
(set #last-file "Disk.3") ; last file imager should create
;****************************
;----------------------------
; Checks if given program is reachable via the path
; if not abort install
; IN: #program - to check
; OUT: -
(procedure P_chkrun
(if
(= 0 (run ("cd SYS:\nWhich %s" #program)))
("")
(abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the WHDLoad package." #program))
)
)
;****************************
(set #program "WHDLoad")
(P_chkrun)
(set #program "Patcher")
(P_chkrun)
(if
(exists #readme-file)
(if
(= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
("")
(run ("SYS:Utilities/More %s" #readme-file))
)
)
(if
(= @user-level 2)
(
(set #CI_drive
(askchoice
(prompt "Select source drive for diskimages")
(default 0)
(choices "DF0:" "DF1:" "DF2:" "DF3:")
(help @askchoice-help)
)
)
(if
(= #CI_drive 0)
(set #CI_drive "DF0:")
)
(if
(= #CI_drive 1)
(set #CI_drive "DF1:")
)
(if
(= #CI_drive 2)
(set #CI_drive "DF2:")
)
(if
(= #CI_drive 3)
(set #CI_drive "DF3:")
)
)
(
(set #CI_drive "DF0:")
)
)
(set @default-dest
(askdir
(prompt ("Where should \"%s\" be installed ?\nA drawer \"%s\" will automatically be created." @app-name @app-name))
(help @askdir-help)
(default @default-dest)
(disk)
)
)
(set #dest (tackon @default-dest @app-name))
(if
(exists #dest)
(
(set #choice
(askbool
(prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
(default 1)
(choices "Delete" "Skip")
(help @askbool-help)
)
)
(if
(= #choice 1)
(run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
)
)
)
(makedir #dest
(help @makedir-help)
)
(copyfiles
(help @copyfiles-help)
(source ("/%s.info" @app-name ))
(dest @default-dest)
)
;----------------------------
(copyfiles
(help @copyfiles-help)
(source "B.A.T..info")
(dest #dest)
)
(copyfiles
(help @copyfiles-help)
(source ("%s.Slave" @app-name ))
(dest #dest)
)
(copyfiles
(help @copyfiles-help)
(source ("%sInstall.info" @app-name ))
(dest #dest)
)
(copyfiles
(help @copyfiles-help)
(source ("%sInstall" @app-name ))
(dest #dest)
)
(copyfiles
(help @copyfiles-help)
(source ("%s.Imager" @app-name ))
(dest #dest)
)
(if
(exists #readme-file)
(
(copyfiles
(help @copyfiles-help)
(source #readme-file)
(dest #dest)
)
(copyfiles
(help @copyfiles-help)
(source ("%s.info" #readme-file))
(dest #dest)
)
)
)
(run ("Assign \"%s:\" \"%s\"" @app-name #dest))
(run ("Patcher -p%s.imager -s%s" @app-name #CI_drive))
(run ("Assign \"%s:\" Remove" @app-name))
(if
(exists (tackon #dest #last-file))
("")
(abort "Diskimaging not successful !\nThe Patcher couldn't create all files needed !")
)
;----------------------------
(run ("Delete %s ALL QUIET FORCE" #cleanup)) ;delete temporary files
(exit)